cmake_minimum_required (VERSION 2.6) 


project(UDT)

include_directories("." "udt")

subdirs(
 udt
)


#cflag cxxflag
add_definitions("-g -Wall")

add_executable(udt udt_main.c)
target_link_libraries (
    udt
    libUDT
)


if (DEFINED ${PROJECT_NAME}_DEPENDS OR DEFINED BUILD_WITH OR DEFINED LINK_WITH )
# load macro
	if ( NOT EXISTS "${CMAKE_MODULE_PATH}/MacroCheckDeps.cmake" )
		message( FATAL_ERROR 
				"\nSorry, could not find MacroCheckDeps.cmake...\n"
				"Please set CMAKE_MODULE_PATH correctly with: "
				"cmake -DCMAKE_MODULE_PATH=<path_to_cmake_modules>" )
	ENDIF()
	include( "${CMAKE_MODULE_PATH}/MacroCheckDeps.cmake" )
	CHECK_DEPS()
endif()

include( CMakeExportBuildSettings )
CMAKE_EXPORT_BUILD_SETTINGS( "${PROJECT_NAME}BuildSettings.cmake" )
EXPORT_LIBRARY_DEPENDENCIES( "${PROJECT_NAME}LibDeps.cmake" )
